#!/usr/bin/env python
# coding: utf-8

# In[10]:


import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif']=['SimHei']
plt.rcParams['axes.unicode_minus']=False

x = np.linspace(-10, 10, 2047)
#y = np.sin(x)
y = [0x383,0x3f5,0x395,0x244,0x3f8,0x10,0x11a,0x1eb,0x46,0x3fd,0x228,0x1eb,0x0,0x27d,0xbb,0x222,0x14a,0x2c5,0xce,0x212,0x3fd,0x368,0x36f,0x3a8,0x350,0x24f,0x361,0x1cd,0x236,0x6b,0x3b9,0x125,0x1fb,0x92,0x1cd,0x150,0x27b,0xf1,0x138,0x36c,0x20b,0x3b1,0x283,0x5a,0x399,0x27e,0x44,0x338,0x125,0x1d1,0x35,0x21f,0x25,0x3ca,0x1b4,0x108,0x3e2,0x197,0x238,0x121,0xff,0x24e,0x219,0x2de,0xfc,0xce,0x2c0,0x3e5,0x2e2,0x163,0x1a5,0x1fa,0x2c1,0x3c1,0x1df,0x3c3,0x12b,0x107,0x8f,0x1ec,0x38f,0x162,0x3e7,0x87,0xd3,0x14a,0x18,0x116,0x2d,0x392,0x21e,0x280,0x258,0x109,0x171,0x218,0x1bd,0x135,0x3e2,0x12a,0x26a,0xa,0x2bc,0x19e,0x19f,0xb5,0x2d4,0x370,0xd4,0x399,0x323,0x381,0x290,0x34e,0x16c,0x13f,0x31e,0x54,0x3b6,0x13f,0x161,0xe5,0x1e4,0x392,0xb7,0x1d7,0x32,0x199,0x3f6,0x3a4,0x3ac,0x2fd,0x2f5,0x34d,0x270,0x220,0x252,0x350,0x348,0x2f,0x2d2,0x2ff,0xed,0x139,0x21d,0x1a7,0x1f0,0x2a0,0x9f,0x107,0xae,0x294,0x123,0x3f,0xf,0x2d1,0xed,0x333,0x3d1,0x158,0x27a,0x2f9,0x3f8,0xd5,0x2ab,0x5c,0x158,0x1b9,0x2f6,0x3f,0x76,0x1b0,0x70,0xee,0x1f0,0x2cb,0x3ea,0x324,0x130,0xf2,0x368,0x1c9,0x4e,0xaf,0x2ec,0x293,0x314,0x2d9,0x34a,0x3c6,0xf9,0xc2,0x228,0xaa,0x1a7,0x170,0x198,0x384,0x273,0x166,0xfc,0x13a,0x323,0x12c,0x398,0x3c5,0x2f1,0x120,0x96,0x19f,0x2ea,0x337,0x33f,0xd3,0x1f1,0x15c,0x132,0x257,0x117,0x208,0x147,0x9c,0x36,0x385,0x151,0x1fa,0x5f,0x3f,0x148,0x3dd,0x123,0x167,0x2e,0x285,0x85,0x2f6,0x10c,0x329,0x3db,0x28a,0x2a1,0x3e7,0x3b9,0x202,0x1ab,0x42,0x2bb,0x4f,0x3b2,0xb0,0x1f7,0x216,0xd3,0x304,0x210,0x2be,0x2e3,0x105,0x3f9,0x336,0x90,0x344,0x22,0x282,0x81,0xa6,0xd2,0x178,0x2cb,0x2a7,0x2b,0x5b,0x2cc,0x30d,0x149,0x3cc,0x118,0x191,0x2a2,0x13d,0x1ec,0x148,0x203,0x2c1,0x15f,0x4c,0x387,0x201,0x38f,0x10e,0x2cc,0x60,0x38d,0x1d0,0x393,0xa7,0x349,0x82,0x25a,0x39c,0x2c6,0x84,0x362,0x28d,0x27b,0x6b,0x1d4,0x19d,0x1ea,0x19f,0x3e4,0x318,0x33f,0x17a,0x2fd,0xe4,0x2a6,0x2c8,0x30,0x2c3,0x80,0x14b,0x39f,0x3f5,0x81,0x19a,0x38e,0x319,0xa5,0x3d,0x3cd,0x11a,0x361,0x3cf,0x3d0,0x26f,0x13a,0x8f,0x2fc,0x15b,0xb8,0x8f,0x260,0x299,0xee,0x51,0x3b7,0x183,0x271,0x15f,0x6c,0x258,0x7b,0x12f,0x1a0,0x391,0x34d,0x49,0x2b3,0x28c,0x2b4,0x350,0x7b,0x1c2,0x11f,0x239,0x144,0x1ba,0xc,0x18d,0x2,0x2f8,0xa9,0x29,0x31c,0x1d2,0x89,0x1e1,0x34f,0xa1,0xc3,0x2e9,0x3e3,0x9c,0x101,0x16,0x315,0x52,0x1ff,0x47,0x3de,0x14e,0x1d4,0x16f,0x1c7,0x3c2,0x265,0x38f,0x132,0x32a,0x50,0xc3,0x36b,0x248,0xc2,0x37b,0x167,0x227,0xe3,0x2f7,0x10b,0x58,0xa3,0x1da,0x201,0x340,0x9f,0xda,0x117,0x1be,0x1f5,0x37b,0x65,0x171,0x3bf,0x20e,0x2e2,0x138,0x32e,0x3ef,0x268,0x8e,0x2fc,0x259,0x243,0x2bf,0x20c,0x69,0x352,0x1fb,0x155,0x9f,0x236,0x29,0x41,0x204,0x4a,0x2cf,0x98,0x3cb,0x291,0x2a8,0x247,0xb4,0x24d,0x46,0x39e,0x3e,0x227,0x371,0x359,0x29a,0x2e4,0x3e8,0x36a,0x300,0xdf,0x69,0x3f3,0x39e,0xe5,0x3df,0x172,0x11c,0x2d2,0x23e,0x24b,0x270,0x2bd,0x9a,0x3aa,0x9a,0x135,0x370,0x291,0x132,0xae,0xc5,0x1fc,0x9,0x26e,0x293,0x15d,0x36,0x3b9,0x208,0x3ce,0x123,0xb0,0x150,0x15c,0x30e,0x283,0x2d2,0x2d3,0x3b1,0x34,0x3b9,0x1c4,0x25b,0x3e2,0x1a,0xb3,0x32d,0x390,0x329,0x33f,0x11a,0x135,0x1ef,0x15d,0x2e8,0x105,0x26e,0x377,0x38,0x29e,0x1d8,0x1f9,0x27,0x141,0x36c,0x240,0x353,0x19f,0x1dc,0x3e5,0x3e6,0xf9,0x2ba,0x2f7,0xda,0xb7,0x10b,0x362,0xeb,0x5f,0x284,0xe6,0x14,0x36,0x330,0x346,0x1e3,0x2d3,0x330,0x1c,0x91,0xa8,0xbc,0x1ed,0x144,0x17c,0x31c,0x188,0x3c3,0x342,0x1b3,0x192,0x10a,0x380,0x33a,0x26e,0x17e,0x159,0x349,0x61,0x1a8,0xeb,0x374,0x3d3,0x1a3,0x1,0x325,0x2b6,0x324,0x1d5,0x15f,0x1cb,0x135,0x27e,0x25a,0x1a7,0x277,0x2d5,0xb3,0x217,0x304,0x2fc,0x3a0,0x10a,0x69,0xdb,0x2b6,0xf6,0x19f,0x279,0x299,0x331,0x25b,0xd8,0x17b,0x2de,0x161,0x2fe,0x164,0x2c8,0x216,0x81,0x374,0x157,0xf,0xdd,0x191,0x2a0,0x2c8,0x61,0x51,0x29c,0x3d,0x1f3,0x3f7,0x42,0x35b,0x38f,0x87,0xf8,0x92,0x9f,0x298,0x1b9,0x207,0x1b9,0x5,0xdc,0x3ce,0x16,0xcf,0x379,0x2ac,0x101,0x366,0x245,0x1b3,0x1f6,0x19a,0x7d,0xd9,0x57,0x317,0x136,0x195,0x132,0x265,0x2f6,0x2dd,0x37f,0x22,0x98,0xde,0x1e,0x3c9,0x150,0x100,0x12d,0x30c,0x24b,0x31,0x338,0x221,0x18e,0x2bc,0x1ec,0x16,0x194,0x304,0x319,0x200,0x1e6,0x178,0x29,0x24,0x322,0x181,0x17,0x27c,0x360,0x3f6,0x337,0x262,0x16d,0x347,0xbf,0x1df,0x132,0x2b0,0x66,0x296,0x35d,0x1ee,0x256,0x1dc,0x159,0x109,0x381,0x1cf,0x14f,0x2fa,0x16f,0x195,0x2f3,0x1c8,0x28e,0x159,0x295,0x1ea,0x362,0x28f,0x232,0xb3,0x240,0x166,0x1b7,0x27e,0x260,0x328,0xe,0x14,0x338,0x2e2,0x217,0x3cb,0x208,0x35f,0x1d9,0x3dd,0x1cf,0x14e,0x273,0x37,0x139,0x29a,0x46,0x2aa,0x261,0xda,0x48,0x3dc,0x3cf,0x16f,0x39,0x29b,0x341,0x1f0,0x1e1,0x13a,0x3b1,0x185,0x170,0x101,0x122,0x13b,0x34a,0x14c,0x2cd,0x1dd,0x32f,0x361,0x143,0x3f5,0x202,0x28b,0x2b0,0x30b,0x1af,0x261,0xb3,0x35b,0x16b,0x3eb,0x2e0,0x252,0x25b,0x20c,0x286,0x2e7,0x211,0xb1,0x15f,0x23d,0xaf,0xc9,0x1bf,0x149,0x127,0x3e8,0x217,0x28e,0x28a,0x97,0x244,0x3f0,0x1e2,0x200,0x2dd,0x170,0x23d,0xc3,0x32b,0x35,0xc2,0x31d,0x10e,0x341,0x108,0x6f,0x1ae,0x3bd,0x84,0x25d,0x1c2,0xe,0x352,0xe8,0x28f,0xf9,0x6d,0x391,0x29,0x3ed,0x3ea,0x1a,0x26c,0x1d9,0x15c,0x15a,0x391,0x59,0x21,0x129,0x3da,0x367,0x3be,0x32e,0x48,0x3b2,0x309,0x1d7,0xa5,0x74,0x368,0x240,0x160,0xd7,0xfa,0x268,0x105,0x2d8,0x1d5,0x33f,0x332,0x51,0x35c,0x399,0xf6,0x162,0x200,0x379,0x206,0xe5,0x242,0xf1,0x6a,0x256,0x84,0x316,0x3fd,0x387,0xc4,0xc0,0x191,0x387,0x87,0x1d7,0x82,0x38d,0x39f,0x244,0x5c,0x3c6,0x25c,0x3b,0xe9,0x1df,0x31e,0x137,0x167,0x1e4,0x17c,0x271,0xe9,0x1dc,0x3bb,0x3d2,0x11d,0xef,0x393,0x58,0x8c,0x9d,0x2ed,0x136,0x11,0x7d,0x2f4,0x20b,0x329,0x399,0x17,0x40,0x2a1,0x30b,0x1e8,0x33a,0x296,0x101,0x2a8,0x2e3,0x1f1,0x309,0x184,0x17a,0x3dd,0xcd,0x381,0x2e8,0x241,0x107,0x11c,0x230,0xea,0xa2,0x122,0xe0,0xca,0x13e,0x3e7,0x1ef,0x1e9,0x3cb,0x2b5,0x24c,0x2a0,0x1c4,0x198,0x274,0x3fe,0x151,0x39a,0x2f5,0x227,0x2cf,0x122,0x19c,0x1c8,0x2c9,0x26e,0x227,0x39e,0x2c0,0x99,0xba,0x3db,0x159,0x33b,0x2fb,0x9e,0x17c,0x204,0x33e,0x34,0x16e,0x3b3,0x23a,0x3a1,0x37e,0x2c5,0x243,0x2fd,0x308,0x223,0x7c,0x1ba,0x37d,0x14a,0x31e,0x88,0x332,0x119,0x128,0x3d1,0x1cd,0x374,0x214,0x137,0x288,0x3b9,0x3e4,0x3f0,0x37a,0x3aa,0x156,0x3c4,0x254,0x3fa,0xe9,0x2b6,0x4f,0x2e8,0x29a,0x129,0x5e,0x41,0xd0,0x1d7,0x226,0x380,0x2bc,0x353,0x81,0x12,0x23d,0x14f,0x2be,0x334,0x2d9,0x182,0x35d,0x29c,0x3f0,0x19d,0x2d4,0xe9,0x6,0x38a,0x1d1,0x2b5,0x26c,0x2cf,0x297,0x259,0x2ee,0x35e,0x21c,0x1ed,0x243,0x10c,0x1bf,0x64,0xfc,0x2f2,0x27b,0x3c7,0x156,0x26e,0x365,0x285,0x79,0x96,0x396,0x379,0x32f,0x12e,0x34a,0x286,0x337,0xb5,0x3f6,0x210,0x29c,0x379,0x35a,0x35a,0x2ff,0x90,0x3e2,0x176,0x358,0x2e6,0xec,0x3d1,0x1ad,0x1e7,0x30f,0x2f8,0x393,0x221,0x3cd,0x3c8,0x168,0x2d,0x35c,0xe8,0x27a,0x27e,0x36a,0xc7,0xe4,0x38f,0x322,0x3a7,0x24c,0xf3,0x324,0x37f,0x38a,0x8e,0x286,0x1e1,0x1f1,0x27,0x3f6,0x358,0x27f,0x3f7,0x1a6,0x321,0x17e,0x335,0x252,0x14e,0x3da,0x19e,0x3e8,0x188,0x381,0x105,0x2,0x16d,0x1b7,0x1e0,0x97,0x130,0x5,0xf9,0xc6,0x12f,0x2f5,0x128,0x35e,0x33c,0x27,0x1ca,0x2f8,0x35c,0x1a8,0x4,0x2a5,0x27f,0x141,0x2c0,0x85,0x34,0x185,0x10b,0xa5,0x2d,0x227,0x23a,0x2d6,0x226,0x68,0x37,0x3b1,0x35d,0xe0,0xe7,0x213,0x19a,0x40,0x1d1,0x13a,0xf,0x3a2,0x31f,0x301,0x1a6,0x116,0x3f8,0x123,0x2f4,0x282,0x39a,0x10f,0x3de,0x136,0x1f,0x33b,0x19c,0x151,0x20d,0xd1,0x322,0xa6,0x396,0x5b,0x13,0x38a,0xa2,0x30f,0x110,0x9a,0x2ce,0x6f,0x3b5,0x2a2,0x93,0x10d,0x30e,0x320,0x3f8,0x52,0x8,0x2b6,0x216,0x27f,0x3b2,0x11a,0x26e,0x1c2,0x3f5,0x3c6,0x1be,0x264,0x1ce,0x39,0x187,0x30e,0x39d,0xf0,0x1c5,0x30b,0x294,0x6c,0xf1,0x50,0x2fb,0x37e,0x112,0x46,0x1ff,0x3d7,0x29,0x3e,0x141,0x327,0x243,0x18c,0x198,0x78,0x88,0x1f,0x1d0,0x3e4,0x1af,0x2ad,0x1b3,0x3d0,0x3da,0x3bc,0x1df,0x198,0x12c,0x2aa,0x13a,0x327,0x24d,0x39,0x2c0,0x269,0x2df,0x320,0x8e,0x2c8,0xa0,0x3dc,0x281,0x184,0x365,0x29e,0x21,0x36e,0x1c9,0x45,0x3ac,0xd8,0x2d2,0x2af,0x48,0x395,0x271,0x99,0x2aa,0x2b2,0x279,0x23d,0xe4,0x265,0x2fd,0x215,0x2d9,0x395,0x25c,0x391,0x3f2,0x1da,0x2fb,0x38a,0x160,0x21f,0xf3,0x3bf,0x1af,0x88,0x170,0x30b,0x210,0x33f,0x85,0x7d,0x31f,0x149,0x2c9,0x3e1,0x380,0x3af,0x305,0x34e,0x38e,0xc2,0x36c,0xb3,0x372,0x208,0x1de,0xd3,0x182,0x300,0x121,0x71,0x3a1,0x2a0,0xf,0x1cd,0x292,0x169,0x5d,0x378,0x31c,0xf6,0x312,0x3ac,0x9,0x2b0,0x341,0x212,0x231,0xac,0x271,0x219,0x358,0x1fb,0x39d,0x151,0x2c7,0x350,0x329,0x2e3,0x3b3,0x38e,0x4a,0x21e,0x278,0x8e,0xee,0x2db,0x1d6,0x28d,0x2d6,0x334,0x20a,0x2d3,0x24e,0x75,0x12,0x33a,0x130,0xe7,0x12c,0x1a9,0x149,0x310,0x9d,0x199,0x3c8,0x3fb,0x3b2,0x29f,0x1d6,0xf4,0xe3,0x187,0x116,0x131,0x3bf,0x136,0x39,0x1aa,0x178,0x369,0x29f,0x336,0x312,0x37c,0x6d,0x29e,0x3de,0x2b5,0x127,0x25a,0x240,0x3c5,0x38d,0x1d5,0xb2,0x32d,0x23e,0x1f3,0x19,0x2a7,0x1d3,0x177,0x82,0x189,0x288,0xcf,0x26e,0x370,0x2a4,0x13b,0x1cb,0x3ca,0x216,0x344,0x162,0x2b4,0x8e,0x381,0x6e,0x324,0x268,0xf7,0x22f,0xb0,0x1e6,0x16a,0x3eb,0x2fe,0x34b,0x220,0x30,0x307,0x305,0x1b0,0x248,0x245,0x98,0x348,0x2d3,0x308,0x1c0,0x37b,0x20f,0x2d0,0x33e,0xcc,0x17a,0x2a4,0x20b,0x83,0x384,0x279,0x393,0x38,0x1ab,0x2ca,0x1e,0x34d,0x37b,0x204,0x1b0,0x27a,0x23f,0x2f,0x1cf,0x374,0x158,0x33d,0xbb,0x398,0x255,0xc3,0x109,0x33b,0x338,0x7d,0x35a,0x105,0x2df,0x1dc,0x20e,0x22a,0x2ff,0x3b5,0x3b2,0x118,0x366,0x2fc,0xa7,0x0,0xce,0xb0,0x346,0x66,0x10a,0xb8,0x27f,0x355,0x21c,0x53,0x343,0xd1,0x36,0x197,0x251,0x1e8,0x2a3,0x236,0x89,0x18,0x3e4,0x213,0x3a9,0xe5,0x2b7,0x263,0x1f5,0x2eb,0x3d5,0x17c,0x7d,0x1af,0x344,0x193,0xfa,0x129,0x65,0x175,0x3c,0x92,0x19b,0x38a,0x3b,0x29a,0x1b8,0x2e,0x133,0x1d6,0x2c0,0x21c,0x16c,0x15c,0x17a,0x24a,0x2e9,0x178,0x381,0xd7,0x30e,0x31b,0x263,0x1f4,0x3f4,0x35a,0x242,0x1ff,0xce,0x2d7,0x14c,0x1e3,0xb9,0xa5,0xcf,0x249,0x207,0x359,0x303,0x219,0x30b,0x16f,0x1c5,0x17c,0x3a9,0xf5,0x41,0xe4,0x1,0x64,0x145,0x18,0xb8,0x2e8,0x1a,0x107,0x3e4,0x334,0x1fb,0x3d7,0x335,0x102,0x1cb,0x380,0x1d4,0xbe,0x1c9,0x2f6,0xf,0x2a3,0x3b4,0x1e8,0x33c,0x277,0x1ce,0x213,0x1b4,0x2a3,0x29a,0x9c,0x19f,0x253,0x13e,0x3c1,0x1d3,0xc4,0x51,0x3b5,0x312,0x1b9,0x19a,0x1d9,0x292,0x31a,0x306,0x131,0x265,0x68,0x15e,0x320,0x385,0x29e,0xa2,0x127,0x153,0xc5,0x2ee,0x1ee,0x1ea,0x1d7,0x83,0x1cc,0x29d,0x57,0x1f8,0x3ca,0x2b7,0xa1,0x20,0x1ad,0x24b,0x350,0x373,0x372,0x13,0x3da,0x86,0x5b,0x1bf,0x365,0x383,0x2d5,0x29e,0x26e,0x34c,0x384,0x1dc,0x242,0x39b,0x35e,0x2b5,0x98,0x3d6,0x363,0x1a0,0xad,0x161,0x198,0x2ed,0x39,0x302,0x1e1,0xd1,0x20a,0x274,0x71,0x2b5,0x205,0x246,0x393,0x238,0x16e,0x330,0xf0,0x276,0x155,0x26a,0x1e,0x32,0x3f6,0xbc,0x1ff,0x39d,0x3ab,0x2a2,0x9a,0xa9,0x17a,0x16,0x375,0x29f,0x11f,0x192,0x2d7,0x2c7,0x197,0x3e2,0x2cb,0x320,0x207,0x7b,0x82,0x21d,0x23a,0x1ca,0x2f7,0xa1,0x20a,0x18b,0x38b,0x396,0x1e4,0x29,0x16c,0x332,0x1c1,0x47,0x254,0x193,0x177,0x223,0x261,0x239,0x39f,0x3ee,0x3b2,0x1e2,0xaf,0x157,0x57,0x277,0x227,0x3a7,0x2b0,0x30c,0x2da,0x177,0x69,0x139,0x102,0x1d2,0x3ec,0x2b2,0x133,0x19d,0x83,0x37f,0x21,0xc,0x58,0x313,0x25f,0x20,0x338,0x2d1,0x15e,0x11a,0x1b6,0x63,0x305,0x21c,0x212,0x2d8,0x1ce,0x21,0x382,0x46,0x1e3,0x2bb,0x24d,0x32,0x1a8,0x2f8,0xbf,0x3e,0x160,0x313,0x2b8,0x22a,0x326,0x10e,0x203,0x3eb,0x200,0x92,0x135,0x336,0x14c,0x302,0xa0,0x316,0x1bf,0x18c,0x338,0x13b,0x167,0x33d,0x1e8,0x397,0x8d,0x8e,0xcc,0x283,0x164,0x161,0x341,0x312,0x241,0xc5,0x283,0x198,0x25d,0x3ce,0x210,0x38,0x388,0x123,0x271,0x108,0x33c,0x381,0x163,0x1f6,0x84,0x27a,0x30b,0x178,0x1bd,0xe,0x215,0x3dc,0x10c,0x25,0x18f,0x68,0xd4,0x196,0x254,0x253,0x1b6,0x126,0xf9,0xcf,0x36d,0x398,0x181,0x28a,0x1b1,0x32c,0x269,0x364,0x3a1,0x21,0x209,0x2f6,0x18d,0x1f9,0x1f4,0x395,0x1fc,0x345,0x3cb,0x326,0x245,0x25b,0x22d,0xee,0x38,0x1fd,0x2ec,0xf9,0x37b,0x5d,0x241,0x15a,0x349,0x309,0x38f,0x246,0x79,0x6c,0x181,0xcf,0x7f,0x1c7,0x96,0x3ad,0x9f,0x13,0x1af,0x2c4,0x21a,0x2f0,0xfa,0x46,0x247,0x3ea,0x1ca,0x2cb,0x273,0x2bd,0x199,0xf5,0x118,0x53,0x19f,0x8d,0x2cf,0x356,0xc8,0x2b4,0x1b5,0x2f4,0x3eb,0x87,0x313,0x1a6,0x14d,0x3cb,0x20a,0x25c,0x323,0xf8,0xcc,0x130,0x4d,0x260,0x60,0x348,0x109,0x39c,0x12a,0x2fb,0x148,0xb5,0x2c0,0x14c,0x125,0x2b,0x84,0x275,0x226,0x326,0x142,0x3,0x14f,0x362,0x10a,0x9f,0x26a,0x128,0x30b,0x72,0x1ef,0xa,0x2d5,0x337,0x1a1,0x3df,0x1e0,0x349,0x10e,0xed,0x180,0xfc,0x1f8,0x24c,0x75,0x36d,0x249,0x43,0xfd,0x10c,0x31a,0x7f,0x3a6,0x2df,0x3b4,0x44,0x206]
z = np.cos(x)

plt.figure(figsize = (8, 4))
plt.grid(True)
plt.plot(x,y,label='$\sin x$', color = 'red', linewidth = 2)
plt.plot(x,z,'b--',label='$\cos x$')
plt.xlabel('Time(s)')
plt.ylabel('')
plt.title('A Sample Example')
plt.ylim(-1, 1)
plt.xlim(-10,10)
plt.legend(loc='best')

plt.show()

# In[ ]:




